﻿using System;
using System.Diagnostics;
using Caliburn.Micro;

namespace Example.Frontend
{
    internal class DebugLog : ILog
    {
        private string _name;

        public DebugLog(Type type)
        {
            _name = type.Name;
        }

        public void Info(string format, params object[] args)
        {
            //string message = String.Format(format, args);
            //Debug.WriteLine("{0} {1} INFO {2}", DateTime.Now.ToLongTimeString(), _name, message);
        }

        public void Warn(string format, params object[] args)
        {
            string message = String.Format(format, args);
            Debug.WriteLine("{0} {1} WARN {2}", DateTime.Now.ToLongTimeString(), _name, message);
        }

        public void Error(Exception exception)
        {
            string message = exception.ToString();
            Debug.WriteLine("{0} {1} ERROR {2}", DateTime.Now.ToLongTimeString(), _name, message);
        }
    }
}